#
# Definitions found in sys/socket.h
#

#
# Types.
#
type | sa_family_t     | sys/socket.h | POSIX+
type | socklen_t       | sys/socket.h | POSIX+
type | struct sockaddr | sys/socket.h | POSIX+
type | struct iovec    | sys/socket.h | POSIX+
type | struct msghdr   | sys/socket.h | POSIX+
type | struct cmsghdr  | sys/socket.h | POSIX+

#
# Values.
#

value | SOCK_DGRAM     | int  | sys/socket.h | POSIX+
value | SOCK_STREAM    | int  | sys/socket.h | POSIX+
value | SOCK_SEQPACKET | int  | sys/socket.h | POSIX+
value | SOL_SOCKET     | int  | sys/socket.h | POSIX+
value | SO_ACCEPTCONN  | int  | sys/socket.h | POSIX+
value | SO_BROADCAST   | int  | sys/socket.h | POSIX+
value | SO_DEBUG       | int  | sys/socket.h | POSIX+
value | SO_DONTROUTE   | int  | sys/socket.h | POSIX+
value | SO_ERROR       | int  | sys/socket.h | POSIX+
value | SO_KEEPALIVE   | int  | sys/socket.h | POSIX+
value | SO_LINGER      | int  | sys/socket.h | POSIX+
value | SO_OOBINLINE   | int  | sys/socket.h | POSIX+
value | SO_RCVBUF      | int  | sys/socket.h | POSIX+
value | SO_RCVLOWAT    | int  | sys/socket.h | POSIX+
value | SO_RCVTIMEO    | int  | sys/socket.h | POSIX+
value | SO_REUSEADDR   | int  | sys/socket.h | POSIX+
value | SO_SNDBUF      | int  | sys/socket.h | POSIX+
value | SO_SNDLOWAT    | int  | sys/socket.h | POSIX+
value | SO_SNDTIMEO    | int  | sys/socket.h | POSIX+
value | SO_TYPE        | int  | sys/socket.h | POSIX+
value | MSG_CTRUNC     | int  | sys/socket.h | POSIX+
value | MSG_DONTROUTE  | int  | sys/socket.h | POSIX+
value | MSG_EOR        | int  | sys/socket.h | POSIX+
value | MSG_OOB        | int  | sys/socket.h | POSIX+
value | MSG_PEEK       | int  | sys/socket.h | POSIX+
value | MSG_TRUNC      | int  | sys/socket.h | POSIX+
value | MSG_WAITALL    | int  | sys/socket.h | POSIX+
value | AF_UNIX        | int  | sys/socket.h | POSIX+
value | AF_UNSPEC      | int  | sys/socket.h | POSIX+
value | AF_INET        | int  | sys/socket.h | POSIX+
value | SHUT_RD        | int  | sys/socket.h | POSIX+
value | SHUT_WR        | int  | sys/socket.h | POSIX+
value | SHUT_RDWR      | int  | sys/socket.h | POSIX+



#
# Functions
#
func |  getsockopt                                                         |\
        int                                                                |\
        int; int; int; void *; socklen_t *                                 |\
        sys/socket.h | POSIX+

func |  setsockopt                                                         |\
        int                                                                |\
        int; int; int; const void *; socklen_t                             |\
        sys/socket.h | POSIX+

func |  accept                                                             |\
        int                                                                |\
        int; struct sockaddr *; socklen_t *                                |\
        sys/socket.h | POSIX+

func |  bind                                                               |\
        int                                                                |\
        int; const struct sockaddr *; socklen_t                            |\
        sys/socket.h | POSIX+

func |  connect                                                            |\
        int                                                                |\
        int; const struct sockaddr *; socklen_t                            |\
        sys/socket.h | POSIX+

func |  getpeername                                                        |\
        int                                                                |\
        int; struct sockaddr *; socklen_t *                                |\
        sys/socket.h | POSIX+

func |  getsockname                                                        |\
        int                                                                |\
        int; struct sockaddr *; socklen_t *                                |\
        sys/socket.h | POSIX+

func |  listen                                                             |\
        int                                                                |\
        int; int                                                           |\
        sys/socket.h | POSIX+

func |  recv                                                               |\
        ssize_t                                                            |\
        int; void *; size_t; int                                           |\
        sys/socket.h | POSIX+

func |  recvfrom                                                           |\
        ssize_t                                                            |\
        int; void *; size_t; int; struct sockaddr *; socklen_t *           |\
        sys/socket.h | POSIX+

func |  recvmsg                                                            |\
        ssize_t                                                            |\
        int; struct msghdr *; int                                          |\
        sys/socket.h | POSIX+

func |  send                                                               |\
        ssize_t                                                            |\
        int; void *; size_t; int                                           |\
        sys/socket.h | POSIX+

func |  sendmsg                                                            |\
        ssize_t                                                            |\
        int; const struct msghdr *; int                                    |\
        sys/socket.h | POSIX+

func |  sendto                                                             |\
        ssize_t                                                            |\
        int; const void *; size_t; int; const struct sockaddr *; socklen_t |\
        sys/socket.h | POSIX+

func |  shutdown                                                           |\
        int                                                                |\
        int; int                                                           |\
        sys/socket.h | POSIX+

func |  socket                                                             |\
        int                                                                |\
        int; int; int                                                      |\
        sys/socket.h | POSIX+

func |  socketpair                                                         |\
        int                                                                |\
        int; int; int; int [2]                                             |\
        sys/socket.h | POSIX+
